home *** CD-ROM | disk | FTP | other *** search
/ Digital Photo Album: Houko Kuwashima / Digital Photo Album: Houko Kuwashima.iso / trump.dxr / 00009.ls < prev    next >
Encoding:
Text File  |  1998-10-08  |  1.2 KB  |  35 lines

  1. global objlist, objfglist, cardlist, missmarklist
  2.  
  3. on trumpinit
  4.   set objlist to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  5.   set objfglist to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  6.   set cardlist to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  7.   set missmarklist to [0, 0, 0, 0, 0, 0]
  8.   definecardlist()
  9.   repeat with i = 1 to 24
  10.     set thisobj to new(script "trumpScript", i + 4)
  11.     setAt(objlist, i, thisobj)
  12.     setAt(objfglist, i, 1)
  13.     puppetSprite(tempsprite, 1)
  14.     set the stretch of sprite (i + 5) to 1
  15.   end repeat
  16.   repeat with i = 30 to 35
  17.     puppetSprite(i, 1)
  18.     set the visible of sprite i to 0
  19.   end repeat
  20. end
  21.  
  22. on definecardlist
  23.   set cardapearlist to [1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0]
  24.   set definedcard to 1
  25.   repeat while definedcard < 25
  26.     set tempcardnum to random(12)
  27.     set apearance to getProp(cardapearlist, tempcardnum)
  28.     if apearance < 2 then
  29.       setAt(cardlist, definedcard, tempcardnum)
  30.       setProp(cardapearlist, tempcardnum, apearance + 1)
  31.       set definedcard to definedcard + 1
  32.     end if
  33.   end repeat
  34. end
  35.